/*
 *  camera.h
 *  Ray Tracer
 *
 *  Created by Chirantan Ekbote on 10/5/10.
 *  Copyright 2010 Ohio State University. All rights reserved.
 *
 */

#ifndef _CAMERA_H_
#define _CAMERA_H_

#ifdef  __cplusplus
extern "C" {
#endif	// __cplusplus
	
#include <math.h>
#include "param.h"
#include "vec3.h"

typedef struct {
	vec3 u;
	vec3 v;
	vec3 n;
	vec3 pos;		// Camera position
	vec3 blpos;		// Bottom left pixel position
	float aspect;	// Aspect ratio
	float fov;		// Field of view in Y
	double pw;		// Pixel width
	double ph;		// Pixel height
} camera;

camera makeCamera(const vec3 eye, const vec3 coi, const vec3 up, const float ratio, 
				  const float view,const float dof, const int width, const int height);

#ifdef __cplusplus
}
#endif // __cplusplus
#endif // _CAMERA_H_